$(document).ready(function(){
    
  $('#form_contato').validate({
    rules:{
      nome:{
        required: true,
        minlength: 3
      },
      email: {
        required: true,
        email: true
      },
      mensagem: "required"
    },
    messages:{
      nome:{
        required: '',
        minlength: ''
      },
      email: {
        required: '',
        email: ''
      },
      mensagem: ''
    }
  });

  $('#form_cadastro').validate({
    rules:{
      nome:{
        required: true,
        minlength: 3
      },
      email: {
        required: true,
        email: true
      },
      senha: {
        required: true,
        minlength: 6
      },
      usuario:{
        required: true
      },
      descricao: "required"
    },
    messages:{
      nome:{
        required: '',
        minlength: ''
      },
      email: {
        required: '',
        email: ''
      },
      senha: {
        required: '',
        minlength: ''
      },
      usuario:{
        required: ''
      },
      descricao: ''
    }

  });

  $('#form_alterarSenha').validate({
    rules:{
      senha_atual: 'required',
      nova_senha: {
        required: true,
        minlength: 6
      },
      re_nova_senha: {
        required: true,
        minlength: 6,
        equalTo: "#nova_senha"
      }

    },
    messages:{
      senha_atual:{
        required: '&nbsp;<span id="erro" title="Este campo &eacute; obrigat&oacute;rio.">*</span>'
      },
      nova_senha: {
        required: '&nbsp;<span id="erro" title="Este campo &eacute; obrigat&oacute;rio.">*</span>',
        minlength: '&nbsp;<span id="erro" title="O n&uacute;mero m&iacute;nimo de caracteres &eacute; 4.">*</span>'
      },
      re_nova_senha:{
        required: '&nbsp;<span id="erro" title="Este campo &eacute; obrigat&oacute;rio.">*</span>',
        minlength: '&nbsp;<span id="erro" title="O n&uacute;mero m&iacute;nimo de caracteres &eacute; 4.">*</span>',
        equalTo: '&nbsp;<span id="erro" title="As senhas digitadas est&atilde;o diferentes.">*</span>'
      }     
    }
  });

  $('#form_alterarUsuario').validate({
    rules:{
      nome:{
        required: true,
        minlength: 3
      },
      email: {
        required: true,
        email: true
      },
      descricao: "required"
    },
    messages:{
      nome:{
        required: '',
        minlength: ''
      },
      email: {
        required: '',
        email: ''
      },
      descricao: ''
    }
  });

});


